<script type="text/javascript" >
    jQuery(".galleryVideo a[rel^='prettyPhoto']").prettyPhoto({
            theme:'facebook',
            keyboard_shortcuts: false
        });
    stFacebookToolbox.load_tooltip();
    stFacebookToolbox.on_submitform('#settingForm');
    //jQuery( "#accordion" ).accordion();
</script>
<?php
function genRandomString() {
    $length = 10;
    $characters = "0123456789abcdefghijklmnopqrstuvwxyz";
    $string = "";    

    for ($p = 0; $p < $length; $p++) {
        $string .= $characters[mt_rand(0, strlen($characters))];
    }

    return $string;
}
?>
<div class="w100p bgl">
    <div class="w100p bgr p5b">

          <div class="w360 p20t po"  style="margin:0 auto;">
        	<div class="sd_l"></div>
            <div class="sd_r"></div>
        	<div class="w360 content_top" style="width:361px;"></div>
            <div class="w360 content_mid"  style="width:361px;">
                <?php if ($functions->appPermission($config, 'applications')){?>
                <div class="icon1" style="border-top:0px;" onclick="stFacebookToolbox.loadPage('applications')">Form Builder</div>
                <?php }?>
                <?php if ($functions->appPermission($config, 'gallery_app')){?>
                <div class="icon4" style="border-top:0px;" onclick="stFacebookToolbox.loadPage('gallery_app', null,null, function(){
                    jQuery('#gallery_app').show();
                    jQuery('#site_map').hide();
                    jQuery('#coupon').hide();
                    jQuery('#inner_content').css('width','87%');
                        jQuery('#inner_content').css('float','right');
                        jQuery('#side-nav').fadeIn('normal');
                })">Gallery</div>
                <?php }?>
                <?php if ($functions->appPermission($config, 'appPostcard')){?>
                <div class="icon2" onclick="stFacebookToolbox.loadPage('dashboardPostcard')">Dynamic postcard</div>
                <?php }?>
                <?php if ($functions->appPermission($config, 'appImageBuilder')){?>
                <div class="icon3">Image map builder</div>
                <?php }?>
                <?php if ($functions->appPermission($config, 'coupon')){?>
                <div class="icon5" onclick="stFacebookToolbox.loadPage('coupon', null,null, function(){
                    jQuery('#coupon').show();
                    jQuery('#site_map').hide();
                    jQuery('#gallery_app').hide();
                    jQuery('#inner_content').css('width','87%');
                        jQuery('#inner_content').css('float','right');
                        jQuery('#side-nav').fadeIn('normal');
                })">Coupons</div>
                <?php }?>
                <?php if ($functions->appPermission($config, 'fbContest')){?>
                <div class="iconcontest" onclick="window.location='admin.php?page=stContestToolbox&action=contest_list'">Facebook konkurranse-modul</div>
                <?php }?>    
            </div>

            <div class="w360 content_bottom"></div>
        </div>

    </div>
</div>
<style>
    .ui-widget-content {
        background:none;
    }
</style>
<input type="hidden" id="default" value="<?php echo $default;?>" />